home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / IDL / ODTypesB.idl < prev    next >
Encoding:
Text File  |  1997-02-13  |  5.4 KB  |  249 lines  |  [TEXT/MPS ]

  1. //#    Copyright:    © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  2.  
  3. //# Primitive and Platform-Independent Types
  4.  
  5. #ifndef _ODTYPESB_
  6. #define _ODTYPESB_
  7.  
  8. #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPESB)
  9. #pragma somemittypes on
  10. #endif
  11.  
  12. //==============================================================================
  13. // Constants
  14. //==============================================================================
  15.  
  16. // for Undo protocol
  17. enum ODDoneState
  18. {
  19.   kODDone,
  20.   kODUndone,
  21.   kODRedone
  22. };
  23.  
  24. //==============================================================================
  25. // Scalar Types
  26. //==============================================================================
  27.  
  28. // Common OD Types
  29.  
  30. typedef boolean        ODBoolean;    // boolean value. Do not count on its size.
  31. typedef octet          ODUByte;    // unsigned >= 8-bit value
  32. typedef char           ODSByte;    // signed >= 8-bit value
  33. typedef unsigned short ODUShort;    // unsigned >= 16-bit value
  34. typedef short          ODSShort;    // signed >= 16-bit value
  35. typedef unsigned long  ODULong;    // unsigned >= 32-bit value
  36. typedef long           ODSLong;    // signed >= 32-bit value
  37. typedef float          ODFloat;    // floating-point value
  38.  
  39. typedef void*          ODPtr;      // OD pointer
  40.  
  41. typedef string  ODISOStr;      // 7 bit ascii. No embedded NULLs. NULL
  42.                     //  terminated.
  43.  
  44. typedef ODISOStr  ODType;      // Used for storage types, focus types,
  45.                     //  data types, etc.
  46.  
  47. typedef ODULong   ODTypeToken;    // Tokenized form of ODType
  48.  
  49. typedef ODULong  ODID;        // Storage Unit IDs
  50.  
  51. typedef ODULong    ODPersistentObjectID;    // Persistent Object ID used for scripting
  52.  
  53. typedef ODType    ODValueType;    // Used to identify the type of the value, e.g., TEXT, PICT and so
  54.                     //  on. Obviously, the type doesn't need to be an OSType.
  55.  
  56. typedef ODSLong  ODError;      // >= 32-bit exception code
  57.  
  58. typedef ODULong  ODToken;      // >= 32-bit unsigned value for tokens
  59.  
  60. typedef ODULong  ODSize;      // >= 32-bit unsigned value for size
  61.  
  62. typedef ODULong   ODInfoType;    // The type for the part info stored in a frame
  63.  
  64. typedef ODULong  ODFlags;      // >= 32-bit unsigned value for flags
  65.  
  66. typedef sequence<octet> ODByteArray;    // ODByteArray should be used for foreign types larger than 4 bytes
  67.                                         // and for variable length data in general
  68.  
  69.  
  70. typedef ODByteArray ODContainerID;
  71. typedef ODISOStr ODContainerType;
  72.  
  73. typedef ODType   ODObjectType;
  74.  
  75. typedef ODType   ODFocusType;      // This is a string, which can be tokenized
  76.  
  77. typedef ODByteArray    ODActionData;      // Action data for undo/redo
  78.  
  79.  
  80. enum ODFramePosition
  81. {
  82.   kODFrameBehind,
  83.   kODFrameInFront
  84. };
  85.  
  86. enum ODTraversalType
  87. {
  88.   kODTopDown,
  89.   kODBottomUp,
  90.   kODChildrenOnly
  91. };
  92.  
  93. enum ODSiblingOrder
  94. {
  95.   kODFrontToBack,
  96.   kODBackToFront
  97. };
  98.  
  99. enum ODNSTypeSpec
  100. {
  101.   kODNSDataTypeODObject,
  102.   kODNSDataTypeODValue
  103. };
  104.  
  105. enum ODRespectMarksChoices
  106.   kODDontRespectMarks,
  107.   kODRespectMarks 
  108. };
  109.  
  110. enum ODActionType
  111. {
  112.   kODSingleAction,
  113.   kODBeginAction,
  114.   kODEndAction
  115. };
  116.  
  117.  
  118.  
  119. //==============================================================================
  120. // Imaging Types
  121. //==============================================================================
  122.  
  123. typedef ODSLong     ODFixed;        // 16.16 fixed-point value
  124. typedef ODSLong        ODFract;        //  2.30 fixed-point value
  125.  
  126. struct ODMatrix       // Transform matrix for translation, scaling,
  127. {                         // skewing, rotation or any combination.
  128.   ODFixed m[3][3];    // Same as "mapping" in QuickDraw GX.
  129. };
  130.  
  131. typedef ODSShort     ODGraphicsSystem;    // Type of graphics system
  132.        
  133. typedef ODSShort ODTransformType;
  134.  
  135.  
  136.  
  137. enum ODGeometryMode {
  138.     kODLoseGeometry,            // Toss out geometric info to save time or space.
  139.     kODPreserveGeometry,        // Preserve geometric info as long as possible
  140.     kODNeedsGeometry            // Must keep geometric info.
  141. };
  142.  
  143. enum ODLinkStatus
  144. {
  145.   kODInLinkDestination,
  146.   kODInLinkSource,
  147.   kODNotInLink
  148. };
  149.  
  150. enum ODHighlight{
  151.     kODNoHighlight,
  152.     kODFullHighlight,
  153.     kODDimHighlight
  154. };
  155.  
  156. //# For ODDragAndDrop
  157. enum  ODDropResult
  158. {
  159.     kODDropFail,
  160.     kODDropCopy,
  161.     kODDropMove,
  162.     kODDropUnfinished        // Used only when DragAndDrop::StartDrag returns immediately.
  163. };
  164.  
  165.  
  166. //# For ODLink
  167.  
  168. typedef ODULong    ODLinkKey;
  169.  
  170.  
  171. //# For ODTranslation
  172.  
  173. enum ODTranslateResult {
  174.     kODCannotTranslate,
  175.     kODCanTranslate
  176. };
  177.  
  178. typedef ODULong ODPlatformTypeSpace;
  179.  
  180. //# For ODStorageUnit
  181.  
  182.  
  183.  
  184. typedef void*    ODValue;
  185. typedef ODID    ODValueIndex;
  186. typedef ODID    ODStorageUnitID;
  187.  
  188. const    ODULong kODStorageUnitRefSize = 4;
  189. typedef ODUByte ODStorageUnitRef[kODStorageUnitRefSize];
  190.  
  191. typedef ODULong ODStorageUnitKey;
  192.  
  193. typedef ODISOStr  ODPropertyName;
  194. typedef ODISOStr  ODStorageUnitName;
  195. typedef ODULong ODPositionCode;
  196.  
  197. //# For ODDocument
  198.  
  199. typedef  ODID        ODDocumentID;
  200.  
  201. //# For ODDraft
  202.  
  203. enum ODPurgePriority {
  204.     kODInvisibleBlocks,
  205.     kODAllBlocks,
  206.     kODVisibleBlocks
  207. }; 
  208.  
  209. enum ODCloneKind {
  210.     kODCloneCopy,
  211.     kODCloneCut,
  212.     kODClonePaste,
  213.     kODCloneDropCopy,
  214.     kODCloneDropMove,
  215.     kODCloneToLink,
  216.     kODCloneFromLink
  217. };
  218.  
  219. enum ODDraftPermissions {
  220.     kODDPNone,
  221.     kODDPTransient,
  222.     kODDPReadOnly,
  223.     kODDPSharedWrite,
  224.     kODDPExclusiveWrite
  225. };
  226.  
  227. typedef    ODID    ODDraftID;
  228. typedef    ODISOStr    ODDraftName;
  229.  
  230.  
  231. //# moved from ErrorDef.idl (NO TYPES/STRUCTS/CLASSES SHOULD BE IN .DEF FILES)
  232.  
  233. exception ODException {
  234.     ODError    error;
  235.     char    message[256];
  236. };
  237.  
  238. #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
  239. #pragma somemittypes off
  240. #endif
  241.  
  242. module OpenDoc_Global_TypesB 
  243. {
  244.     const string OpenDoc_Types_Version = "1.0.";
  245. };
  246.  
  247. #endif //# _ODTYPESB_
  248.